import request from '@/utils/request'

// 查询mySQL数据源配置列表
export function listBackups(query) {
  return request({
    url: '/backups/backups/list',
    method: 'get',
    params: query
  })
}

// 查询mySQL数据源配置详细
export function getBackups(id) {
  return request({
    url: '/backups/backups/' + id,
    method: 'get'
  })
}

// 新增mySQL数据源配置
export function addBackups(data) {
  return request({
    url: '/backups/backups',
    method: 'post',
    data: data
  })
}

// 修改mySQL数据源配置
export function updateBackups(data) {
  return request({
    url: '/backups/backups',
    method: 'put',
    data: data
  })
}

// 删除mySQL数据源配置
export function delBackups(id) {
  return request({
    url: '/backups/backups/' + id,
    method: 'delete'
  })
}
